import torch
a=torch.tensor([1,2,3,4,5])
print(a[1:3])
print(a[1:-1])


b=torch.tensor([
                [1,2,3,4],
               [5,6,7,8],
               [9,10,11,12]
                ])
print(b[:,2])

c=torch.tensor([
                [[1,2,3],[4,5,6],[7,8,9]]
                ])
print(c[:,:,2])